package cn.yuanqiao.web.controller.system;

import cn.yuanqiao.common.core.domain.AjaxResult;
import cn.yuanqiao.system.domain.SysPasswordRule;
import cn.yuanqiao.system.service.ISysPasswordRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zjj
 * @date 2023/8/2
 */
@RestController
@RequestMapping("/system/syspwdrule")
public class SysPasswordRuleController {
    @Autowired
    private ISysPasswordRuleService sysPasswordRuleService;

    @PostMapping("/getpwdrule")
    public AjaxResult getInfo()
    {
        return AjaxResult.success(sysPasswordRuleService.selectByTenantCode());
    }

    @PostMapping("/savepwdrule")
    public AjaxResult addpwdrule(@RequestBody SysPasswordRule passwordRule)
    {
        sysPasswordRuleService.savepwdrule(passwordRule);
        return AjaxResult.success();
    }

}
